interface SpeakHello{
    void speak();
}
class HelloMachine{
    public void trunOn(SpeakHello hello){
        hello.speak();
    }
}
public class E7_3 {
    public static void main(String[] args) {
        HelloMachine m = new HelloMachine();
        m.trunOn(new SpeakHello() {
            @Override
            public void speak() {
                System.out.println("hello,you're welcomed!");
            }
        });
        m.trunOn(new SpeakHello() {
            @Override
            public void speak() {
                System.out.println("你好，欢迎光临！");
            }
        });
    }
}
